package app.vendorportal.api.marketplace.data;

import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author carl.you
 */
@XmlRootElement(name = "pick-ticket-item")
@XmlAccessorType(XmlAccessType.FIELD)
public class PickTicketItem {

    @XmlElement(name = "line-item-id")
    private String lineItemID;

    @NotNull(message = "quantity is required")
    @XmlElement(name = "quantity")
    private int quantity;

    @XmlElement(name = "unit")
    private String unit;

    @NotNull(message = "sku is required")
    @XmlElement(name = "sku")
    private String sku;

    @NotNull(message = "unit price is required")
    @XmlElement(name = "unit-price")
    private BigDecimal unitPrice;

    @XmlElementWrapper(name = "pick-ticket-item-gift-messages")
    @XmlElement(name = "pick-ticket-item-gift-message")
    private List<PickTicketItemGiftMessage> giftMessages;

    public String getLineItemID() {
        return lineItemID;
    }

    public void setLineItemID(String lineItemID) {
        this.lineItemID = lineItemID;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getSku() {
        return sku;
    }

    public void setSku(String sku) {
        this.sku = sku;
    }

    public BigDecimal getUnitPrice() {
        return unitPrice;
    }

    public void setUnitPrice(BigDecimal unitPrice) {
        this.unitPrice = unitPrice;
    }

    public List<PickTicketItemGiftMessage> getGiftMessages() {
        return giftMessages;
    }

    public void setGiftMessages(List<PickTicketItemGiftMessage> giftMessages) {
        this.giftMessages = giftMessages;
    }
}
